<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8" />
    <title>CompositeBoxGroup - ESUI Demo</title>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="../../../dep/esui/3.2.0-beta.2/demo/assets/google-code-prettify/prettify.css" />
    <link rel="stylesheet" href="../../../dep/esui/3.2.0-beta.2/demo/assets/themes/standard.css" />
    <!--[if lt IE 9]>
    <link rel="stylesheet" href="assets/ie8.css" />
    <![endif]-->
</head>
<body>
    <div class="header">
        <h1 id="branding">ESUI - CompositeBoxGroup</h1>
    </div>
    <div class="ui-g main-container">
        <div id="side-bar" class="ui-u-1-5">
            <ul id="navigator" class="ui-nav">
            </ul>
        </div>
        <div id="main" class="ui-u-4-5">
            <h2>CompositeBoxGroup</h2>
            <div class="intro">
                <p>CompositeBoxGroup</p>
            </div>
            <div class="example ui-demo-light-stage">
                <div data-ui-type="CompositeBoxGroup" 
                    data-ui-id="box-group-horizontal" 
                    data-ui-name="gender"
                ></div>
            </div>
        </div>
    </div>
    <script src="../../../dep/esui/3.2.0-beta.2/demo/assets/loader/esl.js"></script>
    <script src="config.js"></script>
    <script src="../../../dep/esui/3.2.0-beta.2/demo/demo.js"></script>
    <script src="../../../dep/esui/3.2.0-beta.2/demo/assets/google-code-prettify/prettify.js"></script>
    <script id="main-js">
    require(
        [
            'esui',
            'jquery',
            'CompositeBoxGroup',
            'demo'
        ],
        function (ui, $) {
            var datasource = [
                {
                    id: 'male',
                    text: '男',
                    value: 'male',
                    children: [
                        {
                            id: 'nanrenyao',
                            text: '男人妖',
                            value: 'nanrenyao'
                        },
                        {
                            id: 'malegod',
                            text: '男神 ',
                            value: 'nangod'
                        }
                    ]
                },
                {
                    id: 'female',
                    text: '女',
                    value: 'female',
                    children: [
                        {
                            id: 'nvrenyao',
                            text: '女人妖',
                            value: 'nvrenyao'
                        },
                        {
                            id: 'femalegod',
                            text: '女神 ',
                            value: 'femalegod'
                        }
                    ]
                }
            ];

            ui.init(
                document.body,
                {
                    properties : {
                        'box-group-horizontal': {
                            datasource: datasource,
                            value: 'ALL'
                        }
                    }
                }
            );
            ui.get('box-group-horizontal').on(
                'change',
                function () {
                    console.log('已选值：' + this.getValue());
                }
            );
        }
    );
    </script>
    <script src="sitemap.js"></script>
</body>
</html>
